<template>
    <div class="home">
        <van-nav-bar title="查看详情" left-text="返回" left-arrow border fixed @click-left="$router.go(-1)" />
        <div style="height:50px"></div>
        <div class="title">
            基本信息
        </div>
        <div class="info-line">
            <div>教育方向选择</div>
            <div>{{info.edu_direction_text}}</div>
        </div>
        <div class="info-line" style="">
            <div>产品选择</div>
            <div>{{info.goods_name}}</div>
        </div>
        <div class="info-line">
            <div>姓名</div>
            <div>{{info.name}}</div>
        </div>
        <div class="info-line">
            <div>性别</div>
            <div>{{info.sex}}</div>
        </div>
        <div class="info-line">
            <div>出生日期</div>
            <div>{{info.birthday}}</div>
        </div>
        <div class="info-line">
            <div>身份证号</div>
            <div>{{info.id_card}}</div>
        </div>
        <div class="info-line">
            <div>家庭地址</div>
            <div>{{info.address}}</div>
        </div>
        <div class="info-line">
            <div>联系电话</div>
            <div>{{info.mobile}}</div>
        </div>
        <div class="info-line">
            <div>学费</div>
            <div>{{info.price}}</div>
        </div>
        <div class="info-line">
            <div>报名时间</div>
            <div>{{info.edu_enter_time_text}}</div>
        </div>
        <div class="info-line">
            <div>开始学习时间</div>
            <div>{{info.start_time_text}}</div>
        </div>
        <div class="info-line">
            <div>结束学习时间</div>
            <div>{{info.over_time_text}}</div>
        </div>
        <div class="info-line">
            <div>毕业/领证时间</div>
            <div>{{info.end_time_text}}</div>
        </div>
        <div class="info-line">
            <div>学习标准</div>
            <div>{{info.edu_standard}}</div>
        </div>
        <div class="info-line">
            <div>前置学历</div>
            <div>{{info.edu_education}}</div>
        </div>
        <div class="info-line">
            <div>学位申请</div>
            <div>{{info.edu_degree_text}}</div>
        </div>
        <div class="info-line">
            <div>是否通过</div>
            <div>{{info.edu_pass_text}}</div>
        </div>
        <div class="title">
            开票信息
        </div>
        <div class="info-line">
            <div>是否允许后付款</div>
            <div>{{info.lag_pay==0?'否':'是'}}</div>
        </div>
        <div class="info-line">
            <div>付款方式</div>
            <div>{{info.payment_type==1?'公对公付款':'个人转账'}}</div>
        </div>
        <div class="info-line">
            <div>发票类型</div>
            <div>{{info.invoice_type_text}}</div>
        </div>
        <div class="info-line">
            <div>开票类型</div>
            <div>{{info.invoice_class_text}}</div>
        </div>
        <div class="info-line">
            <div>发票名称</div>
            <div>{{info.invoice_name}}</div>
        </div>
        <div class="info-line">
            <div>公司名称</div>
            <div>{{info.invoice_company}}</div>
        </div>
        <div class="info-line">
            <div>税号</div>
            <div>{{info.invoice_tax_code}}</div>
        </div>
        <div class="info-line">
            <div>公司地址</div>
            <div>{{info.invoice_address}}</div>
        </div>
        <div class="info-line">
            <div>公司联系电话</div>
            <div>{{info.invoice_mobile}}</div>
        </div>
        <div class="info-line">
            <div>开户行</div>
            <div>{{info.invoice_bank}}</div>
        </div>
        <div class="info-line">
            <div>开户账号</div>
            <div>{{info.invoice_bank_code}}</div>
        </div>
        <div class="info-line">
            <div>是否见票付款</div>
            <div>{{info.invoice_pay_text==0?'否':'是'}}</div>
        </div>
        <div style="height: 10vh;"></div>
    </div>
</template>

<script>
// @ is an alias to /src

export default {
    name: "educationDetail",
    data() {
        return {
            info: '',
        };
    },
    methods: {
        getOrderInfo() {
            let params = {
                token: localStorage.getItem('token'),
                wx_member_id: localStorage.getItem('wx_member_id'),
                id: this.$route.query.id,

            };
            this.$post("/api/Education/detail", params)
                .then(res => {
                    let newObj = {};
                    Object.assign(newObj, res.data.basic_information, res.data.invoice_information)
                    this.info = newObj
                }).catch(err => { });
        },
    },
    created() {
        this.getOrderInfo()
    },

}
</script>
<style scoped lang="less">
.info-line {
    border-bottom: 1px solid #eee;
    margin: 0 16px;
    padding: 13px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 16px;

    > div:nth-of-type(1) {
        width: 35vw;
        color: #777777;
    }

    > div:nth-of-type(2) {
        flex: 1;
        color: #333;
    }
}

.border-last:last-child {
    border: none;
}
</style>
